<?php

namespace app\admin\controller;

use think\Controller;

use Lib\Page;

class Index extends Controller
{
    public function __construct()
    {
        parent::__construct();
        $admin['css'] = ADMIN_CSS;
        $admin['js'] = ADMIN_JS;
        $admin['img'] = ADMIN_IMG;
        $admin['fonts'] = ADMIN_FONTS;
        $admin['vendor'] = ADMIN_VENDOR;
        $this->assign('admin', $admin);
        $this->admin_limit=ADMIN_LIMIT;
        $this->session_admin = session('admin');
        if (!$this->session_admin) {
            controller('login')->login();
            die;
        }
        //服务器信息
        $server=$_SERVER;
        $server['now_time']=date("Y-m-d H:i",time());
        $server['PHP_VERSION']=PHP_VERSION;
//        dump($server);die;
        $this->assign('server', $server);
        $this->assign('style',0);
    }


    public function index()
    {

        echo $this->fetch();
    }


}
